package edu.sctu.zhuyingzhi.month201506.day20150628.theSecondTestV2.Util;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Created by user13 on 2015/6/28.
 */
public class FileUtil {
    public static void juageExist(String path){
        File srcfile = new File(path);
        if (!srcfile.exists()) {
            srcfile.mkdirs();
        }
    }
    public static void writeToFile(String str){


        try {
            FileOutputStream fileOutputStream = new FileOutputStream(new File("D:/Json/Json.txt"));
            fileOutputStream.write(str.getBytes());
            fileOutputStream.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
